<div class="flex column container">
	<curd-pane module="sys/sys_plugin" :fullscreen="true" comment="插件"
			   :refresh="refresh" :search="search" :columns="[['title','标题']]"
			   :current="current">
		<api-button type="info" label="安装"
					v-if="current&&!current.installed" :api="'sys/sys_plugin/install/'+current.id"></api-button>
		<api-button
				v-if="current&&!current.running"
				type="warning" label="启动" confirm="是否要启动该插件"
				:api="'sys/sys_plugin/active/'+current.id"></api-button>
		<api-button
				v-if="current&&current.running"
				type="danger" label="关闭" confirm="是否要关闭该插件"
				:api="'sys/sys_plugin/deactive/'+current.id"></api-button>
		<api-button
				v-if="current&&current.running"
				type="danger" label="卸载" confirm="是否要卸载该插件"
				:api="'sys/sys_plugin/uninstall/'+current.id"></api-button>
	</curd-pane>
	<simple-table :list="list" :loading="loading" @change="handleSelect"
		:columns="[['id','编号'],['title','名称'],['version','版本'],['description','描述'],[(vo)=>vo.installed?'是':'否','是否安装'],[(vo)=>vo.running?'是':'否','是否运行']]">
	</simple-table>
	<simple-pagination :search="search" :total="total" @refresh="refresh" />
</div>